package com.fzy.core.entity;

public class MappingProperty {
	public static final int STRING = 0;
	public static final int LONG = 1;
	public static final int DATE = 2;
	
	String name;
	String showName;
	String column;
	String comment;
	int type;
	int length;
	boolean isNullAvailable;
	String defaultValue;
	boolean isId;
	boolean isForeign;
	String foreignClass;
	boolean isQuery;
	boolean isShow;
	MappingClass parentClass;
	public MappingProperty(String name, String showName, String column,
			String comment) {
		super();
		this.name = name;
		this.showName = showName;
		this.column = column;
		this.comment = comment;
		this.type = STRING;
		this.length = 255;
		this.isNullAvailable = true;
		this.defaultValue = null;
		this.isId = false;
		this.isForeign = false;
		this.foreignClass = null;
		this.isQuery = false;
		this.isShow = true;
	}
	
	public MappingProperty(String name, String showName, String column,
			String comment, int type, int length, boolean isNullAvailable,
			String defaultValue, boolean isId, boolean isForeign,
			String foreignClass, boolean isQuery, boolean isShow,
			MappingClass parentClass) {
		super();
		this.name = name;
		this.showName = showName;
		this.column = column;
		this.comment = comment;
		this.type = type;
		this.length = length;
		this.isNullAvailable = isNullAvailable;
		this.defaultValue = defaultValue;
		this.isId = isId;
		this.isForeign = isForeign;
		this.foreignClass = foreignClass;
		this.isQuery = isQuery;
		this.isShow = isShow;
		this.parentClass = parentClass;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShowName() {
		return showName;
	}

	public void setShowName(String showName) {
		this.showName = showName;
	}

	public String getColumn() {
		return column;
	}

	public void setColumn(String column) {
		this.column = column;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public boolean isNullAvailable() {
		return isNullAvailable;
	}

	public void setNullAvailable(boolean isNullAvailable) {
		this.isNullAvailable = isNullAvailable;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public boolean isId() {
		return isId;
	}

	public void setId(boolean isId) {
		this.isId = isId;
	}

	public boolean isForeign() {
		return isForeign;
	}

	public void setForeign(boolean isForeign) {
		this.isForeign = isForeign;
	}

	public String getForeignClass() {
		return foreignClass;
	}

	public void setForeignClass(String foreignClass) {
		this.foreignClass = foreignClass;
	}

	public boolean isQuery() {
		return isQuery;
	}

	public void setQuery(boolean isQuery) {
		this.isQuery = isQuery;
	}

	public boolean isShow() {
		return isShow;
	}

	public void setShow(boolean isShow) {
		this.isShow = isShow;
	}

	public MappingClass getParentClass() {
		return parentClass;
	}

	public void setParentClass(MappingClass parentClass) {
		this.parentClass = parentClass;
	}

}
